@echo off
set JAVA_HOME=C:\Program Files\Java\jdk-21
set M2_REPO=%USERPROFILE%\.m2\repository
set CP=

REM 添加Spring Boot和核心依赖
set CP=%CP%;target\classes
set CP=%CP%;%M2_REPO%\org\springframework\boot\spring-boot-starter-web\2.7.18\spring-boot-starter-web-2.7.18.jar
set CP=%CP%;%M2_REPO%\org\springframework\boot\spring-boot-starter\2.7.18\spring-boot-starter-2.7.18.jar
set CP=%CP%;%M2_REPO%\org\springframework\boot\spring-boot\2.7.18\spring-boot-2.7.18.jar
set CP=%CP%;%M2_REPO%\org\springframework\boot\spring-boot-autoconfigure\2.7.18\spring-boot-autoconfigure-2.7.18.jar

REM 添加Spring Framework核心依赖
set CP=%CP%;%M2_REPO%\org\springframework\spring-core\5.3.23\spring-core-5.3.23.jar
set CP=%CP%;%M2_REPO%\org\springframework\spring-context\5.3.23\spring-context-5.3.23.jar
set CP=%CP%;%M2_REPO%\org\springframework\spring-beans\5.3.23\spring-beans-5.3.23.jar
set CP=%CP%;%M2_REPO%\org\springframework\spring-web\5.3.23\spring-web-5.3.23.jar
set CP=%CP%;%M2_REPO%\org\springframework\spring-webmvc\5.3.23\spring-webmvc-5.3.23.jar
set CP=%CP%;%M2_REPO%\org\springframework\spring-jcl\5.3.23\spring-jcl-5.3.23.jar

REM 添加其他必要的依赖
set CP=%CP%;%M2_REPO%\org\apache\tomcat\embed\tomcat-embed-core\9.0.78\tomcat-embed-core-9.0.78.jar
set CP=%CP%;%M2_REPO%\com\fasterxml\jackson\core\jackson-databind\2.15.3\jackson-databind-2.15.3.jar

REM 启动应用程序
"%JAVA_HOME%\bin\java.exe" -cp "%CP%" com.example.deepseek.backend.DeepSeekBackendApplication
pause